package com.jgp.attachment.model;

import com.jgp.common.persistence.UUIDModel;
import com.jgp.common.annotation.UI;
import org.hibernate.annotations.Type;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;
import javax.persistence.Transient;

/**
 * 项目   parent
 * 作者   loufei
 * 时间   2018/4/28
 */
@UI
@Entity
@Table(name = "doc_mount_object")
public class MountObject extends UUIDModel {
    //文件
    @Column(name = "file_id",length = 32)
    private String fileId;
    //挂载对象
    @Column(name = "object_id",length = 32)
    private String objectId;
    //挂载对象类型
    @Column(name = "object_type")
    private String objectType;
    //是否允许分享
    @Type(type = "yes_no")
    @Column(name="can_share")
    private Boolean canShare = false;

    //文件信息透明字段
    @Transient
    private FileInfo fileInfo;

    public String getFileId() {
        return fileId;
    }

    public void setFileId(String fileId) {
        this.fileId = fileId;
    }

    public String getObjectId() {
        return objectId;
    }

    public void setObjectId(String objectId) {
        this.objectId = objectId;
    }

    public String getObjectType() {
        return objectType;
    }

    public void setObjectType(String objectType) {
        this.objectType = objectType;
    }

    public Boolean getCanShare() {
        return canShare;
    }

    public void setCanShare(Boolean canShare) {
        this.canShare = canShare;
    }

    public FileInfo getFileInfo() {
        return fileInfo;
    }

    public void setFileInfo(FileInfo fileInfo) {
        this.fileInfo = fileInfo;
    }
}
